package com.comprehensive.common.dto;

import java.util.List;

/**
 * 通用分页响应类
 * @param <T> 数据类型
 */
public class PageResponse<T> {
    private List<T> records; // 当前页的数据列表
    private long total; // 总记录数
    private long size; // 每页记录数
    private long current; // 当前页码

    public PageResponse() {}

    public PageResponse(List<T> records, long total, long size, long current) {
        this.records = records;
        this.total = total;
        this.size = size;
        this.current = current;
    }

    // Getter 和 Setter 方法
    public List<T> getRecords() {
        return records;
    }

    public void setRecords(List<T> records) {
        this.records = records;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public long getCurrent() {
        return current;
    }

    public void setCurrent(long current) {
        this.current = current;
    }
}
